<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    function sayHello(name) {
      console.log(`Hello ${name}`)
    }
    var foo1 = sayHello("Kobe")
    console.log("foo1:", foo1)

    function foo() {
      console.log("foo函数被执行")
    }
    var result = foo()
    console.log("foo的返回值:", result)

    function bar() {
      console.log("bar函数被执行")
      return
    }
    console.log("bar的返回值:", bar())

    function sum(num1, num2) {
      var result = num1 + num2
      return result
    }
    console.log("result:", sum(1, 2))
    
  </script>
</body>

</html>